package com.gjy.service;

import com.gjy.dao.CourseMapper;
import com.gjy.domain.Course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseService {

    @Autowired
    CourseMapper courseMapper;

    public void add(Course course){
        courseMapper.insertSelective(course);
    }

    public List<Course> findAll(){
        return courseMapper.selectByExample(null);
    }
}
